<?php 
	session_start();
	require_once dirname( __FILE__ ) . '/form-process.php';  
	$pageURL = 'http';
	if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
		$pageURL .= "://";
	if ($_SERVER["SERVER_PORT"] != "80") {
		$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
	} else {
		$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
	}	

	$action= $pageURL;
?>

<?php get_header(); ?>

<div id="content">
	<div class="left">
<?php
if ($error != "") {
	if($error=="null")
	{
		echo "<div class=\"success\">"."Please check your mailbox to get password!"."</div>";
	}
	else
		echo "<div class=\"err\">".$error."</div>";
}
?>
        <h2>Forgot your password ?</h2>
        <div class="info">
                <p>Try to be as detailed as possible in formuling your question and describing it. <br />Choosing tags carefully will also help you in getting the right answers as soon as posible.</p>
        </div>
        <div class="question-form">
            <form id="get-password" name="get-password" method="post" action="<?=$action;?>" enctype="multipart/form-data">
            <input type="hidden" name="action" value="getpassword" />
            <?php wp_nonce_field('get-password'); ?>				
                <div class="text-publish2">           
                        <p style="float:left; margin-right:10px; width:100px;">Your Email: </p>                   
                            <input type="text" size="35" name="youremail" class="input" id="youremail" value="<?=$_SESSION['youremail'] ?>" />
                </div>          
                            <input type="image" src="<?php echo get_bloginfo('template_directory'); ?>/images/get-btn.jpg" id="submit_go" style="margin-left:120px;" onclick="submit()"  value="Get Password" />  
            </form>
        </div>
	</div> 
  <?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
